<!--
 描述: 3D立体柱状图
 作者: Jack Chen
 日期: 2020-04-18
-->

<template>
  <div class="hbh-center">
    <div class="topBox">
      <div class="topTip">
        <div class="logo">
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u56.svg?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u60.png?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u59.svg?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
        </div>
        <div class="info"><span>A2</span><span>设备编号</span></div>
      </div>
      <div class="topTip" style="margin-top: 20px;">
        <div class="logo">
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u56.svg?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u65.png?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u59.svg?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
        </div>
        <div class="info"><span>演示</span><span>设备名称</span></div>
      </div>
      <div class="topTip" style="margin-top: 20px;">
        <div class="logo">
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u56.svg?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u65.png?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
          <img
            src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u59.svg?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
            alt=""
          />
        </div>
        <div class="info"><span>七栋5栋</span><span>所在区域</span></div>
      </div>
      <div class="btnBack" @click="handleBack">返回</div>
    </div>
    <div class="topImage" v-if="type == 'hotwater'">
      <div class="container">
        <img
          src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E5%8D%95%E4%B8%AA%E8%AE%BE%E5%A4%87-%E6%B0%B4%E6%8E%A7%E6%9C%BA/u129.png?pageId=5cffb894-0235-47ea-8352-c68f8ead34f6"
          alt=""
        /><img
          src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E5%8D%95%E4%B8%AA%E8%AE%BE%E5%A4%87-%E6%B0%B4%E6%8E%A7%E6%9C%BA/u128.png?pageId=5cffb894-0235-47ea-8352-c68f8ead34f6"
          alt=""
        /><img
          src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E5%8D%95%E4%B8%AA%E8%AE%BE%E5%A4%87-%E6%B0%B4%E6%8E%A7%E6%9C%BA/u133.png?pageId=5cffb894-0235-47ea-8352-c68f8ead34f6"
          alt=""
        />
        <div class="eqreplace"><span>水控机表</span><span></span></div>
      </div>
    </div>
    <div class="pagination">
      <div class="tips">
        <span>选择楼栋</span>
        <span>Building</span>
      </div>
      <div class="leftArrow">
        <img
          src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u53.png?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
          alt=""
        />
      </div>
      <div class="itemChild">
        <span v-for="item in 7" :key="item" :class="{ active: item == 1 }">{{
          item
        }}</span>
      </div>
      <div class="rightArrow">
        <img
          src="https://files.axshare.com/gsc/E0EL5C/fd/21/59/fd2159f2f7f94050a3ed7c0fb1c4079a/images/%E7%83%AD%E6%B3%B5%E7%B3%BB%E7%BB%9F/u52.png?pageId=1faa738d-2fb6-4c2f-b893-e9f972d8c348"
          alt=""
        />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "dtBar3d",
  props: {
    type: {
      type: String,
      default: "pump",
    },
  },
  data() {
    return {};
  },
  created() {},
  computed: {},
  methods: {
    handleBack() {
      switch (this.type) {
        case "pump":
          this.$router.push({ name: "Home" });
          break;
        case "hotwater":
          this.$router.push({ name: "Hotwater" });
          break;
        default:
          break;
      }
    },
  },
  beforeDestroy() {},
};
</script>

<style lang="scss" scoped>
.hbh-center {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 20px 25px;
  box-sizing: border-box;
  .topBox {
    display: flex;
    flex-direction: column;
    .btnBack {
      margin-top: 25px;
      width: 80px;
      height: 30px;
      border-radius: 15px;
      text-align: center;
      line-height: 30px;
      color: #fff;
      background-color: rgb(0, 207, 226);
    }
    .topTip {
      display: flex;
      align-items: center;
      .logo {
        position: relative;
        width: 60px;
        height: 60px;

        img:nth-of-type(1) {
          position: absolute;
          width: 100%;
          height: 100%;
          z-index: 1;
        }
        img:nth-of-type(2) {
          position: absolute;
          width: 36px;
          height: 36px;
          top: calc(50% - 22px);
          left: calc(50% - 18px);
          z-index: 2;
        }
        img:nth-of-type(3) {
          position: absolute;
          width: 10px;
          height: 10px;
          bottom: 0px;
          left: calc(50% - 5px);
          z-index: 3;
        }
      }
      .info {
        display: flex;
        flex-direction: column;
        margin-left: 10px;
        padding: 0 10px;
        box-sizing: border-box;
        width: 200px;
        border-radius: 5px;
        overflow: hidden;
        span:nth-of-type(1) {
          padding-left: 10px;
          font-size: 18px;
          height: 30px;
          line-height: 30px;
          background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0.7) 50%,
            rgba(255, 255, 255, 0.6)
          );
        }
        span:nth-of-type(2) {
          padding-left: 10px;
          color: #8bbee9;
          background: linear-gradient(
            to right,
            rgba(80, 76, 76, 0.8) 50%,
            rgba(255, 255, 255, 0.1)
          );
        }
      }
    }
  }
  .topImage {
    position: absolute;
    left: 0px;
    bottom: 250px;
    width: 100%;
    height: 300px;
    // background-color: red;
    .container {
      height: 100%;
      position: relative;
      .eqreplace {
        width: 100px;
        height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: absolute;
        z-index: 4;
        bottom: 50px;
        left: calc(50% - 120px);
        span:nth-of-type(1) {
          height: 24px;
          line-height: 24px;
          text-align: center;
          padding: 0 10px;
          background:linear-gradient(to right,rgba(56,172,114,.9),rgba(119,142,153,.5));
          border-radius: 10px;
          margin-bottom: 10px;
          box-shadow: 0px 0px 2px #fff;

        }
        span:nth-of-type(2) {
          height: 9px;
          width: 9px;
          background-color: #6FBC9E;
          border: 1px solid #6BD4A1;
          border-radius: 50%;
        }
      }
      img:nth-of-type(1) {
        position: absolute;
        z-index: 1;
        width: 480px;
        height: 183px;
        bottom: 0px;
        left: calc(50% - 240px);
      }
      img:nth-of-type(2) {
        position: absolute;
        z-index: 2;
        width: 354px;
        height: 100px;
        bottom: 145px;
        left: calc(50% - 147px);
      }
      img:nth-of-type(3) {
        position: absolute;
        z-index: 3;
        width: 126px;
        height: 157px;
        bottom: 50px;
        left: calc(50% - 10px);
      }
    }
  }
  .pagination {
    position: absolute;
    bottom: 50px;
    left: 0px;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    .tips {
      display: flex;
      flex-direction: column;
      color: #fff;
      font-size: 16px;
    }
    .leftArrow {
      margin: 0 10px;
      display: flex;
      justify-content: center;
      align-items: center;
      img {
        width: 30px;
        height: 30px;
      }
    }
    .rightArrow {
      margin: 0 10px;
      display: flex;
      justify-content: center;
      align-items: center;
      img {
        width: 30px;
        height: 30px;
      }
    }
    .itemChild {
      display: flex;
      align-items: center;
      span {
        width: 40px;
        height: 40px;
        margin: 0 5px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 24px;
        border-radius: 5px;
        background-color: #b7bdc2;
        border: 0.5px solid rgb(91, 187, 167);
        background-color: rgba(0, 0, 0, 0.2);
        color: #00f8f4;
      }
      .active {
        color: #00f8f4;
        border: 1px solid rgb(91, 187, 167);
        background-color: rgba(91, 187, 167, 0.7);
      }
    }
  }
  .modeChild {
    height: calc(100% - 200px);
  }
  .chartsdom {
    width: 100%;
    height: 100%;
  }

  .bar {
    width: 100%;
    height: 100%;
    position: absolute;
    &.bar-img {
      bottom: 0;
      background: url(../../assets/img/bk_circle.png) no-repeat center 97%;
      background-size: 100%;
      filter: hue-rotate(180deg);
    }
    &.bar-img1 {
      bottom: 30%;
      background: url(../../assets/img/bk_circle1.png) no-repeat center 97%;
      background-size: 75%;
      filter: hue-rotate(180deg);
    }
    &.bar-img2 {
      bottom: 60%;
      background: url(../../assets/img/bk_circle2.png) no-repeat center 97%;
      background-size: 50%;
      filter: hue-rotate(180deg);
    }
  }
}
</style>
